package com.acme.bankapp.domain.bank;

import java.util.Date;

public class Bank {

    final private int _counts = 10;

    public Client[] clients = new Client[_counts];

    public ClientRegistrationListener listener[];


    public static class PrintClientListener implements ClientRegistrationListener {
        public void onClientAdded(Client c) {
            System.out.printf("New client: %s\n", c.getClientSalutation());
        }
    }

    public static class EmailNotificationListener implements ClientRegistrationListener {
        public void onClientAdded(Client c) {
            System.out.printf("Notification email for client %s to be sent\n", c.getClientSalutation());
        }
    }

    public static class DebugListener implements ClientRegistrationListener {
        public void onClientAdded(Client c) {

            System.out.printf("New client: %s and time now: %s\n\n", c.getClientSalutation(), new Date(System.currentTimeMillis()).toString());
        }
    }

    public Bank(ClientRegistrationListener listener[]) {
        this.listener = listener;
    }
}